package org.aileen.springbook.service;

import org.aileen.springbook.Mapper.UserMapper;
import org.aileen.springbook.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    //注入Mapper对象
    @Autowired
    private UserMapper userMapper;
    public UserInfo queryUserByName(String userName) {
        //返回通过UserMapper里面的queryUserInfoByUserName方法查询到的用户信息
        return userMapper.queryUserInfoByUserName(userName);
    }
    //Service调用数据库层Mapper
}
